package com.cyd.springbootweb.controller;

import com.cyd.springbootweb.entity.Apple;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
 * @author keyer
 * @Description : 描述
 * Created by cyd on 2021-07-16 09:24:28
 */
@RestController
@RequestMapping("/apple")
public class AppleController {

    @PostMapping("/sendApple")
    public Apple index(@Valid @NotNull @RequestBody Apple apple) {
        System.out.println(apple);
        return apple;
    }
}
